package com.xuliugen.javamybatis.demo.proxy.dynamicproxy;

/**
 * Created by xuliugen on 2017/11/9.
 */
public class Configuration {

    final MapperRegistry mapperRegistry = new MapperRegistry();

    public <T> T getMapper(Class<T> type) {
        init(type);
        return mapperRegistry.getMapper(type);
    }

    /**
     * 模拟添加mapperRegistry集合
     */
    private <T> void init(Class<T> type) {
        mapperRegistry.addMapper(type);
    }

}
